DonorsChoose

DonorsChoose.org receives hundreds of thousands of project proposals each year for classroom projects in need of funding. Right now, a large number of volunteers is needed to manually screen each submission before it's approved to be posted on the DonorsChoose.org website.

Next year, DonorsChoose.org expects to receive close to 500,000 project proposals. As a result, there are three main problems they need to solve:

The goal of the competition is to predict whether or not a DonorsChoose.org project proposal submitted by a teacher will be approved, using the text of project descriptions as well as additional metadata about the project, teacher, and school. DonorsChoose.org can then use this information to identify projects most likely to need further review before approval.

About the DonorsChoose Data Set

The train.csv data set provided by DonorsChoose contains the following features:

Feature Description
project_id A unique identifier for the proposed project. Example: p036502
project_title Title of the project. Examples:
  • Art Will Make You Happy!
  • First Grade Fun
project_grade_category Grade level of students for which the project is targeted. One of the following enumerated values:
  • Grades PreK-2
  • Grades 3-5
  • Grades 6-8
  • Grades 9-12
project_subject_categories One or more (comma-separated) subject categories for the project from the following enumerated list of values:
  • Applied Learning
  • Care & Hunger
  • Health & Sports
  • History & Civics
  • Literacy & Language
  • Math & Science
  • Music & The Arts
  • Special Needs
  • Warmth

Examples:
  • Music & The Arts
  • Literacy & Language, Math & Science
school_state State where school is located (Two-letter U.S. postal code). Example: WY
project_subject_subcategories One or more (comma-separated) subject subcategories for the project. Examples:
  • Literacy
  • Literature & Writing, Social Sciences
project_resource_summary An explanation of the resources needed for the project. Example:
  • My students need hands on literacy materials to manage sensory needs!
project_essay_1 First application essay*
project_essay_2 Second application essay*
project_essay_3 Third application essay*
project_essay_4 Fourth application essay*
project_submitted_datetime Datetime when project application was submitted. Example: 2016-04-28 12:43:56.245
teacher_id A unique identifier for the teacher of the proposed project. Example: bdf8baa8fedef6bfeec7ae4ff1c15c56
teacher_prefix Teacher's title. One of the following enumerated values:
  • nan
  • Dr.
  • Mr.
  • Mrs.
  • Ms.
  • Teacher.
teacher_number_of_previously_posted_projects Number of project applications previously submitted by the same teacher. Example: 2

* See the section Notes on the Essay Data for more details about these features.

Additionally, the resources.csv data set provides more data about the resources required for each project. Each line in this file represents a resource required by a project:

Feature Description
id A project_id value from the train.csv file. Example: p036502
description Desciption of the resource. Example: Tenor Saxophone Reeds, Box of 25
quantity Quantity of the resource required. Example: 3
price Price of the resource required. Example: 9.95

Note: Many projects require multiple resources. The id value corresponds to a project_id in train.csv, so you use it as a key to retrieve all resources needed for a project:

The data set contains the following label (the value you will attempt to predict):

Label Description
project_is_approved A binary flag indicating whether DonorsChoose approved the project. A value of 0 indicates the project was not approved, and a value of 1 indicates the project was approved.

Notes on the Essay Data

1. READING DATA

1.1 Check for nan values if any

teacher_prefix has nan values.. We will replace it with most freuent value Mrs.

2. Pre-processing DATA

2.1 Text processing: project_essay

2.2 Text Preprocessing: project_title

2.3 Text Preprocessing: project_resource_summary

2.4 Preprocessing: project_subject_categories

2.5 Preprocessing: project_subject_subcategories

2.6 Preprocessing: project_grade_category

3. Creating New Features

  1. Sentiment scores of each of the Essay : Numerical data
  2. Number of words in the Title : Numerical data
  3. Price : Numerical data
  4. Quantity : Numerical data

3.1 Calculate Sentiment Scores for the essay feature

3.2 Calculate Number of words in Title

3.3 Calculate Price and Quantity using resources data

4. Train-Test Split using Stratified Sampling

Splitting features and class label

5.1 Make Data Model Ready: Encoding Essay,project_title

5.1.1 Vectorization using BOW

5.1.1.1 Essay : BOW

5.1.1.2 project_title : BOW

5.1.2 Vectorization using TFIDF

5.1.2.1 Essay : TFIDF

5.1.2.2 project_title : TFIDF

5.1.3 Vectorization using Avg W2V

Using Pre-trained glove vector

5.1.3.1 Essay : Avg. W2V

5.1.3.2 project_title : Avg. W2V

5.1.4 Vectorization using TFIDF W2V

5.1.4.1 Essay : Tfidf weighted Avg. W2V

5.1.4.2 project_title : Tfidf weighted Avg. W2V

5.2 Make Data Model Ready: Encoding Numerical and Categorical features

5.2.1 Encoding categorical feature: clean_categories

5.2.2 Encoding categorical feature: clean_subcategories

5.2.3 Encoding categorical feature: school_state

5.2.4 Encoding categorical feature: teacher_prefix

5.2.5 Encoding categorical feature: project_grade_category

5.2.6 Encoding Numerical feature: Price

5.2.7 Encoding Numerical feature: teacher_number_of_previously_posted_projects

5.2.8 Encoding Numerical feature: 'essay_sentiment_positive'

5.2.9 Encoding Numerical feature: 'essay_sentiment_neutral'

5.2.10 Encoding Numerical feature: 'essay_sentiment_compound'

5.2.11 Encoding Numerical feature: 'essay_sentiment_negative'

6. Concatenating all the features

7.Applying Decision Tree on different kind of featurization

7.1.1 Training Model Using Best HyperParameter and Plotting ROC Curve

7.1.2 Visualizing Confusion Matrix on Train and Test Data

7.1.3 False Positive Essay Word Cloud

7.1.4 Box Plot of 'Price' of False Positives

7.1.5 PDF of 'teacher_number_of_previously_posted_projects' of these False positive data points

7.2.1 Training Model Using Best HyperParameter and Plotting ROC Curve

7.2.2 Visualizing Confusion Matrix on Train and Test Data

7.2.3 False Positive Essay Word Cloud

7.2.4 Box Plot of 'Price' of False Positives

7.2.5 PDF of 'teacher_number_of_previously_posted_projects' of these False positive data points

7.3.1 Training Model Using Best HyperParameter and Plotting ROC Curve

7.3.2 Visualizing Confusion Matrix on Train and Test Data

7.3.3 False Positive Essay Word Cloud

7.3.4 Box Plot of 'Price' of False Positives

7.3.5 PDF of 'teacher_number_of_previously_posted_projects' of these False positive data points

7.4.1 Training Model Using Best HyperParameter and Plotting ROC Curve

7.4.2 Visualizing Confusion Matrix on Train and Test Data

7.4.3 False Positive Essay Word Cloud

7.4.4 Box Plot of 'Price' of False Positives

7.4.5 PDF of 'teacher_number_of_previously_posted_projects' of these False positive data points

8. Summary